<?php
session_start();
require('sqlconnect.php');
if (isset($_GET['logout'])) {
    session_destroy();
    setcookie("user", "", time() - 3600);
    header("Location:HomePage.php");
}
?>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Welcome Froshies!</title>
        <link rel="stylesheet" href="style.css" type="text/css" media="all" />

        <script type ="text/javascript"src="Galleryjs.js"></script>
        <script src="jquery-1.7.2.min.js"></script>
        <script src="jquery.colorbox-min.js"></script>
        <script type ="text/javascript" src="menu.js"></script>


        <script>
            $(document).ready(function(){
                //Examples of how to assign the ColorBox event to elements
                $(".group1").colorbox({rel:'group1', transition:"none", width:"75%", height:"75%"});
                $(".ajax").colorbox();
				
				
                //Example of preserving a JavaScript event for inline calls.
                $("#click").click(function(){ 
                    $('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
                    return false;
                });
            });
        </script>
        <link rel="stylesheet" href="colorbox.css" type="text/css" media="all" />
    </head>
    <body>
        <div id="wrap">  
            <div id="header">
                <div>

                    <a href="HomePage.php"><img id="imgheader"></a>

                </div>
            </div>
            <div id="menu">
                 <ul id="nav">
 


                    <li><a href="HomePage.php" title="Home">Home</a></li>		
                    <li><a href="Campus.php"title="Campus">Campus</a></li>
                    <li><a href="Gallery.php" title="Gallery">Gallery</a></li>
					<?php if ($_SESSION['type'] == 1) { echo '<li><a href="Upload.php" title="Upload">Upload Photo</a></li>'; } ?>
                    <li><a href="#" title="Sponsors">Sponsors</a></li>
                    <li onmouseover="submenushow()" onmouseout="submenuhide()"><a href="LAMB.php" title="Lamb">Lasallian Ambassadors</a></li>
			
		    
                    <li><a href="#" title="FAQ">FAQ</a></li>  </ul>
            
			<ul id="submenu" onmouseover="submenushow()">
                                <li><a href="#">Human Reasource Management<br> and Developement </a></li><br>
                                <li><a href="#">Marketing and Publicity</a></li><br>
                                <li><a href="#">Operations and Logistics</a></li><br>
				<li><a href="#">Research and Documents</a></li><br>
                        </ul>

</div>
            <div id="content">

                <div class="article">
                    <div class="inside">

                        <?php
                        // Grab the data from our people table
                        $sql = "select * from images WHERE college LIKE '%" . $_GET['college'] . "%' AND blockName LIKE '%" . $_GET['blockName'] . "%' AND type LIKE '%" . $_GET['type'] . "%'";
                        $result = mysql_query($sql) or die("Could not access DB: " . mysql_error());

                        while ($row = mysql_fetch_assoc($result)) {
                            echo "<a href=\"ShowPic.php?imgID=" . $row['imgID'] . "\" alt=\"\" />";
                            // Note that we are building our src string using the filename from the database
                            echo "<img class=\"thumb\" src=\"blockpics/" . $row['filename'] . "\" alt=\"\" />";
                            echo "</a>";
                        }
                        ?>
                    </div>                   
                </div>


            </div>
            <div id="sidebar">

                <div class="widget" style="padding-bottom: 20px;">

                    <div class="inside">
<?php require("session.php"); ?>
                    </div>
                </div> 

                <div class="widget" style="padding-bottom: 20px;">

                    <div class="inside">
                        <form style="margin-top:30px;" id="search" class="search">
                            <ul>
                                <li>
                                    <h4 style="font-size:12pt;">Search</h4>
                                </li>
                                <li>
                                    <select name="college" class="formelement">
                                        <option value="">College</option>
                                        <option value="CCS">CCS</option>
                                        <option value="CED">CED</option>
                                        <option value="CLA">CLA</option>
                                        <option value="COS">COS</option>
                                        <option value="COE">GCOE</option>
                                        <option value="COB">RVR-COB</option>
                                        <option value="SOE">SOE</option>
                                    </select> 
                                    <select name="type" class="formelement">
                                        <option value="">Type</option>
                                        <option value="F">Formal</option>
                                        <option value="W">Wacky</option>
                                    </select>
                                </li>
                                <li>
                                    <input name="blockName" placeholder="Block Name" id="blockName" type="text"/>	<br>
                                </li>
                                <li>
                                    <button  id="searchButton" type="submit" onclick="&search=">Search</button>
                                </li>


                            </ul>
                        </form>	


                    </div>
                </div> 

            </div>
        </div>
    </div>



</div>
</div>
</body>
</html>
